home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / sun3.md / RCS / stdarg.h,v < prev    next >
Encoding:
Text File  |  1988-11-16  |  1.6 KB  |  85 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     88.11.15.21.41.23;  author rab;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     88.11.15.21.16.11;  author rab;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Ansi compatible version of varargs.h
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @*** empty log message ***
  28. @
  29. text
  30. @/*
  31.  * stdarg.h --
  32.  *
  33.  *    Macros for handling variable-length argument lists.
  34.  *
  35.  * Copyright 1988 Regents of the University of California
  36.  * Permission to use, copy, modify, and distribute this
  37.  * software and its documentation for any purpose and without
  38.  * fee is hereby granted, provided that the above copyright
  39.  * notice appear in all copies.  The University of California
  40.  * makes no representations about the suitability of this
  41.  * software for any purpose.  It is provided "as is" without
  42.  * express or implied warranty.
  43.  *
  44.  * $Header: varargs.h,v 1.1 88/06/21 09:37:01 ouster Exp $ SPRITE (Berkeley)
  45.  */
  46.  
  47. #ifndef _STDARG
  48. #define _STDARG
  49.  
  50. typedef struct {
  51.     char *vl_current;            /* Pointer to last arg returned from
  52.                      * list. */
  53.     char *vl_next;            /* Pointer to next arg to return. */
  54. } va_list;
  55.  
  56.  
  57. #define va_start(list, lastarg) \
  58.     (list).vl_current = (list).vl_next = ((char *) &lastarg) + 4;
  59.  
  60. #define va_arg(list, type)            \
  61.     ((list).vl_current = (list).vl_next,    \
  62.     (list).vl_next += sizeof(type),        \
  63.      *((type *) (list).vl_current))
  64.  
  65. #define va_end(list)
  66.  
  67. #endif /* _STDARG */
  68. @
  69.  
  70.  
  71. 1.1
  72. log
  73. @Initial revision
  74. @
  75. text
  76. @a26 1
  77. #define va_alist _va_args
  78. a27 2
  79. #define va_dcl int _va_args;
  80.  
  81. d29 1
  82. a29 1
  83.     (list).vl_current = (list).vl_next = (char *) &_va_args;
  84. @
  85.